﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AlertMessage.ascx.cs"
  Inherits="NguyenHoa.Web.Controls.AlertMessage" %>
<%@ Register Assembly="DevExpress.Web.v9.1, Version=9.1.4.0, Culture=neutral, PublicKeyToken=5377c8e3b72b4073"
  Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dxpc" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.1, Version=9.1.4.0, Culture=neutral, PublicKeyToken=5377c8e3b72b4073"
  Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<dxpc:ASPxPopupControl ID="pupAlertMessage" runat="server" ClientInstanceName="pupAlertMessage"
  HeaderText="<%$Resources:Strings, Info %>" PopupHorizontalAlign="WindowCenter"
  PopupVerticalAlign="WindowCenter" Width="350px" AutoUpdatePosition="True" Modal="True">
  <SizeGripImage Height="12px" Width="12px" />
  <ContentCollection>
    <dxpc:PopupControlContentControl runat="server">
      <table>
        <tr>
          <td align="left">
            <dxe:ASPxLabel ID="lblAlertMessage" runat="server" ClientInstanceName="lblAlertMessage"
              Text="" ForeColor="Red">
            </dxe:ASPxLabel>
          </td>
        </tr>
        <tr>
          <td align="center" style="padding-top: 5px;">
            <dxe:ASPxButton ID="ASPxButton1" runat="server" Text="OK" AutoPostBack="false">
              <ClientSideEvents Click="function(s, e){clearAlertMessage();}" />
            </dxe:ASPxButton>
          </td>
        </tr>
      </table>
    </dxpc:PopupControlContentControl>
  </ContentCollection>
  <CloseButtonImage Height="18px" Width="18px" />
  <HeaderStyle>
    <Paddings PaddingTop="1px" PaddingLeft="10px" PaddingRight="6px" />
  </HeaderStyle>
</dxpc:ASPxPopupControl>

<script type="text/javascript">
  function alertMessage(msg) {
    lblAlertMessage.SetText(msg);
    pupAlertMessage.Show();
  }

  function alertSuccess() {
    lblAlertMessage.SetText('<%=(string)GetGlobalResourceObject("Messages", "ERR0005") %>');
    pupAlertMessage.Show();
  }

  function clearAlertMessage() {
    lblAlertMessage.SetText('');
    pupAlertMessage.Hide();
  }

  function confirmDeleteMessage() {
    return '<%=(string)GetGlobalResourceObject("Messages","ERR0006") %>'
  }

  function MissingInfoMessage(infoFields) {
    return '<%=(string)GetGlobalResourceObject("Messages", "ERR0008") %>' + infoFields;
  }
</script>

